#include <catch2/catch.hpp>

#include <cmath>

#include "solution.hpp"

using namespace solution_090;

TEST_CASE("90. Subsets II", "[090]") {

SECTION("example 1") {
    std::vector nums{1,2,2};
    auto subsets = Solution().subsetsWithDup(nums);
    CAPTURE(subsets);
    CHECK(subsets.size() == 6);
}

SECTION("example 2") {
    std::vector nums{1,2};
    auto subsets = Solution().subsetsWithDup(nums);
    CAPTURE(subsets);
    CHECK(subsets.size() == 4);
}

SECTION("example 3") {
    std::vector nums{1,1};
    auto subsets = Solution().subsetsWithDup(nums);
    CAPTURE(subsets);
    CHECK(subsets.size() == 3);
}

SECTION("example 4") {
    std::vector<int> nums;
    auto subsets = Solution().subsetsWithDup(nums);
    CAPTURE(subsets);
    CHECK(subsets.size() == 1);
}

}
